<?php include $this->templateDir . 'common/header.php'; ?>
<!-- Y-Admin核心样式 -->
<link rel="stylesheet" href="/static/css/yadmin.css">
<!-- 通用样式 -->
<link rel="stylesheet" href="/static/css/common.css">
<!-- 首页样式（只为此页面使用） -->
<link rel="stylesheet" href="/static/css/index.css">
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <!-- logo 区域 -->
        <div class="layui-logo">
            <img src="/static/images/security.png" alt="logo" style="margin-left: -5px;" />
            <cite>
                yaoGrace&emsp;
            </cite>
        </div>
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a lay-event="flexible" title="侧边伸缩">
                    <i class="layui-icon layui-icon-shrink-right"></i>
                </a>
            </li>
            <!-- 面包屑 -->
            <span class="layui-breadcrumb layui-anim layui-anim-up">
                    <a><cite>首页</cite></a>
                </span>
        </ul>

        <!-- 头像区域 -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item feature-items">
                <a lay-event="website" title="前台">
                    <i class="iconfont icon-qiantai"></i>
                </a>
            </li>
            <li class="layui-nav-item feature-items">
                <a lay-event="clear" title="清理标签缓存"><i class="iconfont icon-qinglihuancun"></i></a>
            </li>
            <li class="layui-nav-item feature-items">
                <a id="screenFull" lay-event="screenFull" title="全屏">
                    <i class="iconfont icon-quanping"></i>
                </a>
                <a id="screenRestore" lay-event="screenRestore" title="退出全屏" style="display: none;">
                    <i class="iconfont icon-tuichuquanping"></i>
                </a>
            </li>

            <li class="layui-nav-item user-selection">
                <a>
                    <img src="/static/images/avatar.png" class="layui-nav-img" alt="头像">
                    <cite><?php echo getSession('email')?></cite>
                    <span class="layui-nav-more"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd lay-unselect>
                        <a lay-event="userInfo">基本资料</a>
                    </dd>
                    <dd lay-unselect>
                        <a lay-event="editPwd">修改密码</a>
                    </dd>
                    <hr>
                    <dd lay-unselect>
                        <a href="<?php echo u('login','logoff')?>">退出</a>
                    </dd>
                </dl>
            </li>
        </ul>
    </div>

    <!-- 左侧导航区域 -->
    <div class="layui-side ">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="lay-nav" lay-accordion="true">
                <?php foreach ($this->IndexControlData['menus'] as $vo) { ?>
                <li class="layui-nav-item">
                    <a lay-id="<?php echo  $vo['controller'].'/'.$vo['method'] ?>" lay-url="<?php echo PG_SROOT.$vo['controller'].'/'.$vo['method'] ?>">
                        <i class="iconfont  "></i>&emsp;<cite><?php echo $vo['title']?></cite>
                    </a>
                    <?php if(isset($vo['children']) && $vo['children']){ ?>
                    <dl class="layui-nav-child">
                        <?php foreach ($vo['children'] as $cvo) { ?>
                            <dd> <a lay-id="<?php echo  $cvo['controller'].'/'.$cvo['method'] ?>" lay-url="<?php echo u($cvo['controller'],$cvo['method'])?>"> <i class="iconfont  "></i><cite><?php echo $cvo['title']?></cite> </a> </dd>
                        <?php  } ?>
                    </dl>
                    <?php  } ?>
                </li>
                <?php  } ?>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <div class="layui-pagetabs">
            <div class="layui-icon admin-tabs-control layui-icon-refresh-3" lay-event="refresh"></div>
            <div class="layui-tab" lay-unauto lay-allowclose="true" lay-filter="lay-tab">
                <ul class="layui-tab-title">
                    <li lay-id="index/welcome" lay-url="<?php echo u('index','welcome');?>" class="layui-this">
                        <i class="iconfont icon-shouye" style="font-size:20px;line-height: 40px;"></i>
                    </li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <iframe src="<?php echo u('index','welcome');?>" class="layui-iframe"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 移动端遮罩 -->
    <div class="site-mobile-shade"></div>
</div>
<!--首页的全局参数-->
<script>
    var userInfoUrl     =     "";    //个人中心
        editPwdUrl      =     "";    //修改密码
        websiteUrl      =     "<?php echo "//".$_SERVER['HTTP_HOST'];?>";    //网站前台
</script>
<!-- jQuery JS -->
<script src="/static/js/jquery.js"></script>
<!-- index公共JS -->
<script src="/static/js/common.js"></script>
</body>
</html>